package com.operation.dao;

import com.operation.beans.Performance;
import com.operation.beans.WorkOrderAllInfo;
import com.operation.entity.HandleInfo;
import com.operation.entity.WorkOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkOrderMapper {
    int deleteByPrimaryKey(Integer workOrderId);

    int insert(WorkOrder record);

    int insertSelective(WorkOrder record);

    WorkOrder selectByPrimaryKey(Integer workOrderId);

    int updateByPrimaryKeySelective(WorkOrder record);

    int updateByPrimaryKey(WorkOrder record);

    WorkOrder selectIdByJobNumber(String jobNumber);

    int refreshJobNumber(@Param("temp") String temp, @Param("jobNumber") String jobNumber);

    int refreshDistribution(WorkOrder workOrder);

    int updateReceiveTimeByJobNumber(WorkOrder workOrder);

    int updateIsComplete(WorkOrder workOrder);

    int refreshComment(WorkOrder workOrder);

    WorkOrder isComment(String jobNumber);

    int updatePigeonhole(WorkOrder workOrder);

    List<WorkOrder> findWorkOrderByDistribution(WorkOrder workOrder);

    List<WorkOrder> findWorkOrderByIsReceive(WorkOrder workOrder);

    List<WorkOrder> findWorkOrderByIsComment(WorkOrder workOrder);

    List<WorkOrder> findWorkOrderByIsPigeonhole(WorkOrder workOrder);

    List<WorkOrder> findWorkOrderByIsComplete(WorkOrder workOrder);

    WorkOrderAllInfo findWorkOrderStatus(String jobNumber);

    WorkOrder findWorkOrderInfo(WorkOrder workOrder);

    int deleteWorkOrder(WorkOrder workOrder);

    List<WorkOrder> findIsOnGoingWorkOrder(HandleInfo handleInfo);

    List<WorkOrder> findMyAllWorkOrder(Integer receive);

    List<WorkOrderAllInfo> findHistoryWorkOrder(Integer userAccount);

    List<WorkOrderAllInfo> byYear(Performance performance);

    List<WorkOrderAllInfo> byPeople(Performance performance);

    List<WorkOrderAllInfo> byDetails(Performance performance);

    int updateImg(WorkOrder workOrder);

    WorkOrderAllInfo findMyRepairWorkOrder(Long userAccount);

    int complaint(String jobnumber);

    List<WorkOrderAllInfo> checkComplaintList();

    List<WorkOrderAllInfo> findComplaintAndStar();

    int deleteComplaint(String jobNumber);

    List<WorkOrderAllInfo> findComplaintAndIspigeonhole();

    List<WorkOrderAllInfo> isOnGoingWorkOrder(Integer receiveOne);

    List<WorkOrder> isUnderway(Integer userAccount);

    WorkOrder aFewSingle();

    WorkOrder isComplaint(String jobNumber);
}